#include "mainwindow.h"
#include "ui_mainwindow.h"
//#include "DemoConsole.h"

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    m_Rendering = false;
    m_Renderer = new Renderer(0, this);
    m_Renderer->show();
    //m_Demo = new MASGK::CDemoConsole();
    //m_Demo->GUIStart();
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
    m_Renderer->m_Rendering = !m_Renderer->m_Rendering;

    if (m_Renderer->m_Rendering)
    {
        ui->pushButton->setText("Stop");
        emit Render(QPixmap());
    }
    else
    {
        ui->pushButton->setText("Render");
    }
}
